#!/usr/bin/env python
# encoding: utf-8
'''
@author: 王震
@license: 四川凡狼科技有限公司
@contact: 2668985108@qq.com
@file: interview.py
@time: 2022/1/13 9:10 下午
@desc:
'''

from main import db
import datetime


class Interview(db.Model):
    __tablename__ = 'INTERVIEW'

    id = db.Column(db.String(32), primary_key=True, unique=True, nullable=False, comment='id')
    name = db.Column(db.String(32), unique=True, nullable=False, comment='菜单名称')
    show = db.Column(db.Integer, unique=False, nullable=True, default=1, comment='1 线上 2  线下')
    createTime = db.Column(db.DateTime, unique=False, nullable=True, default=datetime.datetime.now, comment='创建时间')
    updateTime = db.Column(db.DateTime, unique=False, nullable=True, default=datetime.datetime.now,
                           onupdate=datetime.datetime.now, comment='更新时间')


class Comment(db.Model):
    __tablename__ = 'COMMENT'
    id = db.Column(db.String(32), primary_key=True, unique=True, nullable=False, comment='id')
    show = db.Column(db.Integer, unique=False, nullable=True, default=1, comment='1 线上 2  线下')
    createTime = db.Column(db.DateTime, unique=False, nullable=True, default=datetime.datetime.now, comment='创建时间')
    updateTime = db.Column(db.DateTime, unique=False, nullable=True, default=datetime.datetime.now,
                           onupdate=datetime.datetime.now, comment='更新时间')


class InterviewQuestions(db.Model):
    __tablename__ = 'INTERVIEW_QUESTIONS'

    id = db.Column(db.String(32), primary_key=True, unique=True, nullable=False, comment='id')
    classificationId = db.Column(db.String(32), unique=False, nullable=False, comment='分类id')
    show = db.Column(db.Integer, unique=False, nullable=True, default=1, comment='1 线上 2  线下')
    details = db.Column(db.Text, unique=False, nullable=False, comment='面试题内通')
    createTime = db.Column(db.DateTime, unique=False, nullable=True, default=datetime.datetime.now, comment='创建时间')
    updateTime = db.Column(db.DateTime, unique=False, nullable=True, default=datetime.datetime.now,
                           onupdate=datetime.datetime.now, comment='更新时间')
